using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;


namespace App4._5
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>

    public partial class Window1 : System.Windows.Window
    {
        public Window1()
        {
            InitializeComponent();

            //Grid definition
            Grid grid = new Grid();
            grid.Width = 200;
            grid.Height = 200;

            //Column definition
            ColumnDefinition column1 = new ColumnDefinition();
            grid.ColumnDefinitions.Add(column1);
            ColumnDefinition column2 = new ColumnDefinition();
            grid.ColumnDefinitions.Add(column2);

            //Row definition
            RowDefinition row1 = new RowDefinition();
            grid.RowDefinitions.Add(row1);
            RowDefinition row2 = new RowDefinition();
            GridLength length1 = new GridLength(30);
            row2.Height = length1;
            grid.RowDefinitions.Add(row2);
            RowDefinition row3 = new RowDefinition();
            GridLength length2 = new GridLength(100, GridUnitType.Pixel);
            row2.Height = length2;
            grid.RowDefinitions.Add(row3);
            RowDefinition row4 = new RowDefinition();
            GridLength length3 = new GridLength(0, GridUnitType.Auto);
            row2.Height = length3;
            grid.RowDefinitions.Add(row4);
            RowDefinition row5 = new RowDefinition();
            GridLength length4 = new GridLength(2, GridUnitType.Star);
            row2.Height = length4;
            grid.RowDefinitions.Add(row5);
        }
    }
}